<? session_start();

include("SVsystem/config/dbconfig.php"); ////////setup
include("SVsystem/class/clases.php");
include("SVsystem/config/dominio.php");
include("SVsystem/class/funciones.php");

$tool = new formulario('db');

	$cat = new tools();
	$cat->dbc = $tool->dbc;

	$dataindex = $tool->simple_db("select index_youtube,index_image,index_titulo,index_texto,index_desc,index_meta,index_footer from preferencias");

	 ///funcion para articulos en categoria del index
	 function traer_item_categoria($categoria,$tabla,$numero,$orden){

				if($tabla!="prod"){ $n="titulo as nombre"; $link ="SV-detalle-articulo.php";  $imagen = "imagen";   $tabla = 'articulo'; }else{  $n="nombre"; $link ="SV-detalle-producto.php"; $imagen = "(select ruta from imagen_producto where prod_id = a.id limit 1) as imagen"; $tabla = 'producto'; } 
				
				$carpeta = "contenido";
			
			if($numero>0) $num = "limit $numero"; else $num = "";
			
			////para obtener el nivel y el id
		   $cati = explode('_',$categoria);
			
			$query = "select moneda_simbolo,precio,id,$n,resumen,date_format(fecha_mod,'%d/%m%/%Y') as fecha,
			$imagen
			from $tabla a, preferencias
			where cat_id = '$cati[1]' and cat_nivel = '$cati[0]' order by orden";
			
			return $query;
		}


?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
	"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
	<meta http-equiv="Content-type" content="text/html; charset=utf-8">

     <meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7">
	<title><?php echo utf8_encode($dataindex['index_titulo']); ?></title>
    <meta name="description" lang="es" content="<?php echo $dataindex['index_desc']; ?>" />
	<meta name="keywords" content="<?php echo $dataindex['index_meta']; ?>" />
<meta name="Robots" content="Index,Follow,Cache, Noodp">
	<link rel="stylesheet" href="estilo.css" type="text/css" media="screen" title="no title" charset="utf-8">
<link rel="stylesheet" href="orbit-1.2.3.css" type="text/css" media="screen" title="no title" charset="utf-8">

	<script src="js/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script>
	<script src="js/menu.js" type="text/javascript" charset="utf-8"></script>
    <script type="text/javascript" src="SVsystem/js/utils.js"></script>
<script type="text/javascript" src="SVsystem/js/banner-mouseover.js"></script>
    <script type="text/javascript" src="SVsystem/js/ajax.js"></script>
<script type="text/javascript" src="js/jquery.orbit-1.2.3.js"></script>	




<!--[if IE]>
			     <style type="text/css">
			         .timer { display: none !important; }
			         div.caption { background:transparent; filter:progid:DXImageTransform.Microsoft.gradient(startColorstr=#99000000,endColorstr=#99000000);zoom: 1; }
			    </style>
			<![endif]-->





<script type="text/javascript">

			$(window).load(function() {
			$('#featured').orbit({
     animation: 'horizontal-push',                  // fade, horizontal-slide, vertical-slide, horizontal-push
     animationSpeed: 800,                // how fast animtions are
     timer: true, 			 // true or false to have the timer
     advanceSpeed: 6000, 		 // if timer is enabled, time between transitions 
     pauseOnHover: true, 		 // if you hover pauses the slider
     startClockOnMouseOut: true, 	 // if clock should start on MouseOut
     startClockOnMouseOutAfter: 10, 	 // how long after MouseOut should the timer start again
     directionalNav: false, 		 // manual advancing directional navs
     captions: false, 			 // do you want captions?
     captionAnimation: 'fade', 		 // fade, slideOpen, none
     captionAnimationSpeed: 800, 	 // if so how quickly should they animate in
     bullets: false,			 // true or false to activate the bullet navigation
     bulletThumbs: false,		 // thumbnails for the bullets
     bulletThumbLocation: '',		 // location from this file where thumbs will be
     afterSlideChange: function(){} 	 // empty function 

})
});

</script>



</head>
<body onload="MM_preloadImages('SVimagenes/fb-like-on.png','SVimagenes/fondo-menu1-on.jpg','SVimagenes/fondo-menu1-activo.jpg','SVimagenes/fondo-menu2-on.jpg','SVimagenes/fondo-menu-a-on.jpg','SVimagenes/fondo-menu2.jpg','SVimagenes/fondo-menu-a.jpg')">


<?php include('SVG-header.php'); ?>



<div id="wrapper">
	
	<div id="contenido">
		<div id="izquierda">
			<?php include('SVG-menu-categorias.php'); ?>
		</div>
		<div id="centro">

			<div id="index">



<div id="carruselflash">
<?php include ("SVG-carrusel.php")?>
</div>

<div id="separador"></div>



<h1 style="border:none!important;"><?php echo utf8_encode($dataindex['index_titulo']); ?></h1>

<!-- AddThis Button BEGIN -->

<div class="addthis_toolbox addthis_default_style addthis_16x16_style" style="margin:0!important; text-align:center; padding:0!important;">

<a class="addthis_button_facebook"></a>
<a class="addthis_button_twitter"></a>
<a class="addthis_button_email">
<a class="addthis_button_google_plusone" style="float:right; "/></a>


</div>
<script type="text/javascript" src="http://s7.addthis.com/js/250/addthis_widget.js#pubid=xa-4db799c6104d8678"></script>

<!-- AddThis Button END -->
<div id="separador"></div>












<?php if(!empty($dataindex['index_image'])){ ?>
							<img src="<?php echo $DOMINIOSV."/contenido/orig/".$dataindex['index_image']; ?>"width="178" height="146"  alt="<?php echo $dataindex['index_titulo']; ?>" />
                     <?php } ?>

               <?php echo utf8_encode($dataindex['index_texto']); ?>
            </div>

<div id="separador"></div>
<!-- PEC -->


<?php //include('SVG-pec.php'); ?>



<!-- /  PEC -->
<div id="separador"></div>

<!-- PAC -->


<?php //include('SVG-pac.php'); ?>



<!-- /  PAC -->

<div id="separador"></div>




            <?php
					////articulos en categorias
				   $tool->query("select * from artxcat order by orden ");

				   $ii=0;
				   while ($row = mysql_fetch_assoc($tool->result)) {

					 ?> <?
							include ("SVG-aec.php");
					  ?><?

				   }
				   ///////////////////////

				   ?>










<div id="separador"></div>


































	  </div>
		<div id="derecha">

            

				<div  class="banners">



					<?php include('SVG-banners.php'); ?>
				</div>
		</div>
<div id="separador"></div>
	
<!--fin del div de contenido -->
</div>


	<div id="fincontenido"></div>
<?php include('SVG-footer.php'); ?>
</div>
<?php include ("http://www.paginainteligente.net/sign.php")?>
</body>
</html>